package com.market.cash.weight.font

import android.content.Context
import android.graphics.Typeface
import android.util.AttributeSet
import androidx.appcompat.widget.AppCompatEditText

/**
 * CashRoot
 * @Author wwdeng
 * @CreateTime: 2024/10/16 10:45
 * @Annotation：常规
 */
class MediumEditView(context: Context, attrs: AttributeSet?) : AppCompatEditText(context, attrs) {

//    init {
//        init(context)
//    }

    override fun setTypeface(tf: Typeface?, style: Int) {
        super.setTypeface(Typeface.DEFAULT_BOLD, Typeface.BOLD)
    }

    /**
     * 初始化字体
     * @param context
     */
    private fun init(context: Context) {
        //设置字体样式
        setTypeface(Typeface.createFromAsset(context.assets, "fonts/bold.TTF"))
    }
}